package com.google.code.pokerstats_service;

import java.io.Serializable;

public class GetStatsParams implements Serializable {
    public Long groupId;
    public Long fromDateMs;
    public Long toDateMs;
    
    private static final long serialVersionUID = 604459733173683709L;
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result
                + ((fromDateMs == null) ? 0 : fromDateMs.hashCode());
        result = prime * result + ((groupId == null) ? 0 : groupId.hashCode());
        result = prime * result
                + ((toDateMs == null) ? 0 : toDateMs.hashCode());
        return result;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        GetStatsParams other = (GetStatsParams) obj;
        if (fromDateMs == null) {
            if (other.fromDateMs != null)
                return false;
        } else if (!fromDateMs.equals(other.fromDateMs))
            return false;
        if (groupId == null) {
            if (other.groupId != null)
                return false;
        } else if (!groupId.equals(other.groupId))
            return false;
        if (toDateMs == null) {
            if (other.toDateMs != null)
                return false;
        } else if (!toDateMs.equals(other.toDateMs))
            return false;
        return true;
    }
}
